<template>
    <view class="content">
        <van-popup position="bottom" @click-overlay="closePopup" :show="show" round z-index=104 closeable @close="closePopup"
            custom-style="width: 100%;background:#ffffff;overflow: hidden; ">
            <view class="popup-content">
                <!-- <scroll-view :refresher-enabled="false" class="scroll-content" scroll-y :lower-threshold="80" show-scrollbar="false"> -->

                <view class="popup-main">
                    <!-- <view style="display: flex; justify-content: space-between;">
                        <view class="popupTitle"> {{title}}</view>
                        <van-icon name="cross" color="#FFFFFF" size="15" @click="closePopup" />
                    </view> -->
                
                    <view class="text">
                        <rich-text :nodes="describeInfo"></rich-text>
                       <!-- <view>1、如果拼团未达到最低人数要求，系统会在规定时间内自动取消拼团，用户不需要手动操作‌</view> 
                       <view style="margin-top: 52rpx;">2、当前拼团活动只限有自提点的小区人可进行拼团</view> -->
                    </view>
                </view>
                <!-- </scroll-view> -->
            </view>
        </van-popup>
    </view>
</template>

<script>
import Toast from '@/wxcomponents/vant/toast/toast'
export default {
    props: {
        show: {
            type: Boolean,
            default: () => false
        },
        describeInfo: {
            type: String,
            default: () => ''
        },
    },
    data () {
        return {
            curS:0,
            curSName:'',
            date: '',
            showMark: true, // 标记
            title: '我的地址',
            option: {},
            url: '',
            stepperValue:1,
            houseList:[
                {
                name:'王涛员',
                tel:'1523623254',
                house:'金鑫·滨湖一号3号楼1单元201',
                isDefault:true
                },
                {
                    name:'王涛员',
                    tel:'1523623254',
                    house:'金鑫·滨湖一号3号楼1单元201',
                    isDefault:false
                },
            ],
        userName:'王涛员',
        userTel:'1523623254',
        checkAll: false, // 标记是否全选
        checked: [], // 全选
        selectedRowKeys: [], // 已选择的数据的id
        selectedRows: [], // 已选择的数据
        inactiveIcon:
          'https://17lelife-bucket.oss-cn-beijing.aliyuncs.com/WeChat-App-Picture/notChecked1126.png',
      activeIcon:
          'https://17lelife-bucket.oss-cn-beijing.aliyuncs.com/WeChat-App-Picture/goodsChecked1126.png',
      disabledIcon:'https://17lelife-bucket.oss-cn-beijing.aliyuncs.com/WeChat-App-Picture/disabledIcon.png',
     
      popupHeight:'300',

        }
    },

    computed: {
    },


  watch:{
    // house: {
    //     immediate: true, // 这句重要
    //     handler(v) {
    //         console.log(v, 'v')
    //         if (v === 1) {
    //         this.houseList=[]
    //         } else{
    //             return false
    //         }
    //     },
    //     deep: true
    //   },
    //   houseList:{
    //     immediate: true, // 这句重要
    //     handler(v){
    //         console.log(v,'houseList')
    //     }
    //   }
  },
    onLoad () {
        if (this.house===0) {
            // this.title = '商品排序'
        } else{
            // this.title = '全部分类'
        }
      
    },
    onReady () {
        console.log(this.house,this.houseList,'onready')
        this.setIsChecked()
    },

    methods: {
        // 插入 isChecked
        setIsChecked(){
            if (this.houseList.length > 0) {
                this.houseList.forEach(item => {
                    if (item.isDefault === true) {
                        this.$set(item, 'isChecked', true)
                    } else {
                        this.$set(item, 'isChecked', false)
                    }
                })
            }
        },
        // 单选框
        radioChange(e){
            console.log('radio发生change事件，携带value值为：', e.detail.value)

            this.houseList.forEach((item,index)=>{
                console.log(index,'index',typeof(index),typeof(e.detail.value), Number(index)=== Number(e.detail.value))
                if(Number(index)=== Number(e.detail.value)){
                    item.isChecked=true
                }else{
                    item.isChecked=false
                }
            })
        },
       
        // 关闭弹窗
        closePopup () {
            console.log('关闭 关闭关闭---------')
            this.$emit('closePopup')
        },

  },

}
</script>
<style lang="scss" scoped>


::v-deep .van-button__text {
    // display: inline-block;
    display: flex !important;
    flex-direction: column !important;
}
// 提示框
.popup-content {
    padding:24px;
    font-size: 24rpx;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    height: 50%;


    .popup-main {
        height: 100%
    }
    .text{
        margin-top: 52rpx;
        color: #111111;
        font-size: 28rpx;
    }

}



::v-deep .van-cell {
    border: 1px solid #888888;
    // background: #FF6203;
}
::v-deep .van-cell--hover .hover-class{
    border: 1px solid #888888;
}




.l20 {
    margin-left: 20px;
}

.r13 {
    margin-right: 13px;
}

.r8 {
    margin-right: 8px;
}
</style>

